package org.vacoor.nothing.demo;

import java.io.IOException;

//import org.vacoor.nothing.web.util.Images;

/**
 */
public class RedisDemo {
    public static void main(String[] args) throws IOException {
        boolean supported = Restarter.isSupported();
        System.out.println(supported);
        /*
        JedisPoolConfig config = new JedisPoolConfig();
        JedisPool jedisPool = new JedisPool(config, "192.168.1.123", 6379);
        Jedis jedis = jedisPool.getResource();
        jedis.set("a", "b");
        String a = jedis.get("a");
        System.out.println(a);
        BufferedImage img = CaptchaBuilder.create().setChars(Randoms.nextChars("abcd".toCharArray(), 4)).build();
        JOptionPane.showMessageDialog(null, null, "title", JOptionPane.YES_OPTION, new ImageIcon(img));
        byte[] key = Bytes.toBytes("captcha");
//        String jpeg = jedis.set(key, Images.toBytes(img, "jpeg"));
        byte[] bytes = jedis.get(key);
//        img = Images.load(bytes);
//        JOptionPane.showMessageDialog(null, null, "title", JOptionPane.YES_OPTION, new ImageIcon(img));
//        System.out.println(jpeg);

        jedis.close();
        */
    }
}
